@extends('admin.admin.index');
@section('title','轮播')
@section('weizhi','轮播图片列表')
@section('con')
	<div class="col-lg-12">
	  <div class="panel panel-default">
	    <div class="panel-heading">
	      <form action="{{url('/admin/carousel/index')}}">
	      <div class="col-sm-4 form-group input-group">
	        <input class="form-control" type="text" name="keywords" value="{{$data['keywords'] or ''}}">
	        <span class="input-group-btn">
	        <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
	        </span>
	      </div>
	      </form>
	    </div>
	    <!-- /.panel-heading -->
	    <div class="panel-body">
	      <div class="dataTable_wrapper">
	        <div class="dataTables_wrapper form-inline dt-bootstrap no-footer" id="dataTables-example_wrapper">
	          <div class="row">
	            <div class="col-sm-6">

	            </div>
	            <div class="col-sm-6">

	            </div>
	          </div>
	          <div class="row">
	            <div class="col-sm-12">
	              <table aria-describedby="dataTables-example_info" role="grid" class="table table-striped table-bordered table-hover dataTable no-footer" id="dataTables-example" >
	                <thead>
	                  <tr role="row">
	                    <th aria-label="Rendering engine: activate to sort column descending" aria-sort="ascending" style="width: 183px;" colspan="1" rowspan="1" aria-controls="dataTables-example" tabindex="0" class="sorting_asc">序号</th>
	                    <th aria-label="Browser: activate to sort column ascending" style="width: 211px;" colspan="1" rowspan="1" aria-controls="dataTables-example" tabindex="0" class="sorting">名称</th>
	                    <th aria-label="Platform(s): activate to sort column ascending" style="width: 192px;" colspan="1" rowspan="1" aria-controls="dataTables-example" tabindex="0" class="sorting">缩略图</th>
	                    <th aria-label="Platform(s): activate to sort column ascending" style="width: 192px;" colspan="1" rowspan="1" aria-controls="dataTables-example" tabindex="0" class="sorting">添加时间</th>
	                    <th aria-label="CSS grade: activate to sort column ascending" style="width: 114px;" colspan="1" rowspan="1" aria-controls="dataTables-example" tabindex="0" class="sorting">操作</th>
	                  </tr>
	                </thead>
	                <tbody>
	                <?php
	                	if(empty($_GET['page'])){
	                		$ps = 1;
	                	}else{
	                		$ps = $_GET['page'];
	                	}
	                	if($ps != 1){
	                		$ps += 4;
	                	}
	                 ?>
					@foreach($cate as $k => $v)
	                  <tr role="row" class="gradeA odd">
	                    <td class="sorting_1">{{$ps}}</td>
	                    <td><a href="">{{$v->name}}</a></td>
	                    <td><img src="/uploads/{{$v->img}}" width="200px" height="100px" alt=""></td>
	                    <td>{{$v->date}}</td>
	                    <td class="center"><a href="{{url('/admin/carousel/delete',['id'=>$v->id])}}">删除</a> | <a href="{{url('/admin/carousel/edit',['id'=>$v->id])}}">修改</a></td>
	                  </tr>
	                  <?php $ps++; ?>
					@endforeach
	                </tbody>
	              </table>
	            </div>
	          </div>
	          <!-- 分页 -->
	          <div class="row">
	            <div class="col-sm-6 col-md-offset-6">
	              <div id="dataTables-example_paginate" class="dataTables_paginate paging_simple_numbers">
					{!! $cate->appends($data)->render() !!}
	              </div>
	            </div>
	          </div>
	        </div>
	      <!-- /.table-responsive -->
	    </div>
	    <!-- /.panel-body -->
	  </div>
	  <!-- /.panel -->
	</div>

@endsection